package com.example.demo.controller;


import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@ConfigurationProperties(prefix = "student") //使用该注解将yml中前缀为“student”的值绑定到bean中
@Component //存储数据到Spring中
@Data //数据
public class StudentController {
    private int id;
    private String name;
    private int age;
}
